﻿using System;
using System.Windows;
using Prism.Commands;
using Prism.Mvvm;

namespace CoverageRunner.App.ViewModels;

public class MainWindowViewModel: BindableBase
{
    public string Title { get; set; } = "覆盖率分析工具";

    #region Commands
    private DelegateCommand? _exitCommand;

    public DelegateCommand ExitCommand =>
        _exitCommand ??= new DelegateCommand(ExecuteExitCommand);

    void ExecuteExitCommand()
    {
        Application.Current.Shutdown();
    }

    private DelegateCommand? _openCommand;

    public DelegateCommand OpenCommand =>
        _openCommand ??= new DelegateCommand(ExecuteOpenCommand);

    void ExecuteOpenCommand()
    {
        throw new NotImplementedException("This method not implement yet!");
    }

    private DelegateCommand? _saveCommand;

    public DelegateCommand SaveCommand =>
        _saveCommand ??= new DelegateCommand(ExecuteSaveCommand, CanExecuteSaveCommand);

    void ExecuteSaveCommand()
    {
        throw new NotImplementedException("This method not implement yet!");
    }

    bool CanExecuteSaveCommand()
    {
        return false;
    }

    private DelegateCommand? _saveAsCommand;

    public DelegateCommand SaveAsCommand =>
        _saveAsCommand ??= new DelegateCommand(ExecuteSaveAsCommand, CanExecuteSaveAsCommand);

    void ExecuteSaveAsCommand()
    {
        throw new NotImplementedException("This method not implement yet!");
    }

    bool CanExecuteSaveAsCommand()
    {
        return false;
    }

    private DelegateCommand? _aboutCommand;

    public DelegateCommand AboutCommand =>
        _aboutCommand ??= new DelegateCommand(ExecuteAboutCommand);

    void ExecuteAboutCommand()
    {
        throw new NotImplementedException("This method not implement yet!");
    }

    private DelegateCommand? _documentCommand;

    public DelegateCommand DocumentCommand =>
        _documentCommand ??= new DelegateCommand(ExecuteDocumentCommand);

    void ExecuteDocumentCommand()
    {
        throw new NotImplementedException("This method not implement yet!");
    }

    #endregion
}